package appapi.entity.mqtt;

import lombok.Data;
import lombok.ToString;

/**
 * @version: java version 1.8
 * @Author: Ygp Work
 * @description:
 * @date: 2023-06-30 17:25
 */
@Data
public class Topic {
    public Topic(String topic) {
        String[] split = topic.split("/");
//        F/96/0/60853d1238810b60548c648c/61234a12b09dbf4a16bf1640/627b59ac9a86e2462b47bece/0/0/0/TpPQpNnlrQr8hedA4ClZ5w==PMMK/Data
//        "F/96/#"
        this.equiNo = split[9];
        this.equiType = split[1];
        this.dataType =split[10];
        this.allTpic = topic;
    }

    private String equiNo;
    private String equiType;
    private String dataType;
    private String allTpic;

//    public String ToString(){
//        return "F/0/0/0/0/0/0/0/0/0/".concat(this.equiNo);
//    };

}
